function r = lpcvd_2DSurface_roughness(h,x,y)
r2 = 0.0;
h_avg = mean(mean(h));
for i = 1:length(x)
    for j = 1:length(y)
        r2 = r2+(h(i,j)-h_avg)^2;
    end
end
r = sqrt(r2/(length(x)*length(y)));